/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.pojo.trailer;

import java.io.Serializable;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author asantos
 */

@XmlRootElement( )
@XmlAccessorType(XmlAccessType.FIELD)
public class Trailer implements Serializable{
    
    private static final long serialVersionUID = 1L;
    
    private int id;
    
    //mandatory
    private long thermo_id=-1;
    
    //max 20 chars
    private String license_plate = null;
    
    private Date inspection_date = null;
    
    private Date cold_inspection_date = null;
    
    //max 20 chars
    private String thermograph_certification = null;
    

    public Date getCold_inspection_date() {
        return cold_inspection_date;
    }

    public void setCold_inspection_date(Date cold_inspection_date) {
        this.cold_inspection_date = cold_inspection_date;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getInspection_date() {
        return inspection_date;
    }

    public void setInspection_date(Date inspection_date) {
        this.inspection_date = inspection_date;
    }

    public String getLicense_plate() {
        return license_plate;
    }

    public void setLicense_plate(String license_plate) {
        this.license_plate = license_plate;
    }

    public long getThermo_id() {
        return thermo_id;
    }

    public void setThermo_id(long thermo_id) {
        this.thermo_id = thermo_id;
    }

    public String getThermograph_certification() {
        return thermograph_certification;
    }

    public void setThermograph_certification(String thermograph_certification) {
        this.thermograph_certification = thermograph_certification;
    }
   
    @Override
    public String toString() {
        return "Trailer:{" + "id:" + id + ", thermo_id:" + thermo_id + ", license_plate:" + license_plate + ", inspection_date:" + inspection_date + ", cold_inspection_date:" + cold_inspection_date + ", thermograph_certification:" + thermograph_certification + '}';
        //return "Trailer:{" + "id:" + id + ", thermo_id:" + thermo_id+"}";
    }
    
    
    
    
    public boolean isValid(){
        if(thermo_id >0)
            return true;
        
        return false;
    }
    
    
}
